fix: expand submit-mode blocking pattern detection#2804
Conversation
|
Hi! I'd like to request review for this PR: Improve blocking pattern detection in submit mode |
|
Thanks for the PR! A few blockers before this can be merged:
|
|
Hi! I'd like to request review for this PR: [WIP] Improve blocking pattern detection in submit mode |
d2a7311 to
48ac0cb
Compare
48ac0cb to
76464c1
Compare
Replace the single-if blocking check with a loop over named patterns for better extensibility and more specific error messages including HTTP status codes.
Summary
Expand the blocking detection logic in submit mode to catch more anti-bot patterns with clear, specific error messages.
Before: Only detected 3 patterns (
/cdn-cgi/challenge-platform,\t\t\t\tnow:,Sorry, you have been blocked), always returned generic "Cloudflare detected" message.After: Loop over named blocking_patterns list covering 6 patterns (Cloudflare variants, generic blocks, access denied, CF headers), returns a specific message including HTTP status codes for debugging.
Changes
maigret/submit.py: Replace single-if blocking check with structured pattern loopExample